<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateUserRelation extends Migrator
{
    public function up()
    {
        $table = $this->table('user_relation',['commont'=>'亲属关系名称表']);
        $table->addColumn('name','string',['limit'=>'120','comment'=>'关系名称'])
            ->addColumn('create_time','integer',['limit'=>10,'signed'=>false,'default'=>time()])
            ->addColumn('update_time','integer',['limit'=>10,'signed'=>false,'default'=>time()])
            ->create();
    }
    public function down(){
        $this->dropTable('user_relation');
    }
}
